<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        Add New Elibrary Data
    </h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo base_url();?>admin_home"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="<?php echo base_url();?>admin_elibrary">Elibrary</a></li>
        <li class="active">Add</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class='row'>
        <div class='col-md-12'>
            <div class='box box-info'>
                <div class='box-header'>
                    <h3 class='box-title'>Data Form</h3>
                    <!-- tools box -->
                    <div class="pull-right box-tools">
                        <button class="btn btn-info btn-sm" data-widget='collapse' data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                        <!--<button class="btn btn-info btn-sm" data-widget='remove' data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>-->
                    </div><!-- /. tools -->
                </div><!-- /.box-header -->
                <div class='box-body pad'>
                <?php
                if(isset($success_status)){
                    ?>
                <div id="msg_success" class="alert alert-success alert-dismissable">
                    <i class="fa fa-check"></i>
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                    <b>Congratulation!</b> New data has been saved.
                </div>
                    <?php
                }
                else{
                    if(isset($error)){
                    ?>
                        <div id="msg" class="alert alert-danger alert-dismissable" style="display: block;">
                            <i class="fa fa-ban"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                            <b>Alert!</b> <?php echo $error;?>
                        </div>
                    <?php
                    }
                    else{
                    ?>
                    <div id="msg" class="alert alert-danger alert-dismissable">
                        <i class="fa fa-ban"></i>
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                        <b>Alert!</b> Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.
                    </div>
                    <?php
                    }
                }
                //upload error
                
                ?>
                    
                    <form role="form" action="<?php echo site_url();?>admin_elibrary/add" method="post" enctype="multipart/form-data" id="elibrary_form">
                        <div class="form-group">
                            <label>Judul</label>
                            <input id="judul" type="text" name="judul" class="form-control" placeholder="Masukkan Judul"/>
                        </div>
                        <div class="form-group">
                            <label>Kategori</label>
                            <select id="kategori" name="kategori" class="form-control">
                                <option value=""> - Pilih Kategori - </option>
                                <option value="dasarhukum">Dasar Hukum</option>
                                <option value="info">Info</option>
                                <option value="report">Report</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Konten Keterangan</label>
                            <textarea id="editor1" name="content" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>    
                        </div>
                        <div class="form-group">
                            <label for="userfile">File</label>
                            <input type="file" id="userfile" name="userfile" />
                            <p class="help-block">.pdf .docx .doc .zip .rar</p>
                        </div>
                        <div class="form-group">
                            <label for="userfile">Gambar Cover</label>
                            <input type="file" id="imageinput" name="imageinput" accept="image/*"/>
                            <p class="help-block">.jpg .png .jpeg</p>
                        </div>
                        <div class="form-group" style="border-top: 1px dotted #ddd;padding-top: 20px;">
                            <button type="submit" id="btn_elibrary_add" class="btn btn-primary"><i class="fa fa-upload"></i>&nbsp;Upload Data</button>
                        </div>
                    </form>
                </div>
            </div><!-- /.box -->
        </div><!-- /.col-->
    </div><!-- ./row -->



</section><!-- /.content -->